<!DOCTYPE html>
<html lang="en">
    <head>
		<meta charset="UTF-8" />
        <title>教师登录</title>
		
        <link rel="stylesheet" type="text/css" href="../easyui-1.5.1/themes/default/easyui.css">
        <link rel="stylesheet" type="text/css" href="../easyui-1.5.1/themes/icon.css">
        <script src="../jquery-2.1.1/jquery.min.js"></script>
		<script src="../easyui-1.5.1/jquery.easyui.min.js"></script>
        <script src="../easyui-1.5.1/locale/easyui-lang-zh_CN.js"></script>
        <script src="../jquery-2.1.1/gVerify.js"></script>
        <link rel="stylesheet" type="text/css" href="css/style.css">
        
		<style>
			body {
				background: #e1c192 url(images/wood_pattern.jpg);
			}
		</style>
    </head>
    <body>
    
    
        <div class="container">
            <div class="codrops-top">
                <a href="#">
                    <strong>&laquo; 白云工商技师学院</strong>
                </a>
                <span class="right">
                    <a href="#">
                        <strong>一体化机房上课学生管理系统</strong>
                    </a>
                </span>
            </div>
			
			<header>
				<h1>Teacher <strong>教师登录</strong> Login</h1>
				<h2>www.hcx520.com</h2>
			</header>
		
				<form class="form" action="login" method="post">
					<h1><span class="log-in">请输入</span></h1>
                     <table>
                    <tr>
                    	<td>
                        	<label><i class="icon-user"></i>用户名</label>
                        	<input id="u" class="easyui-validatebox" type="text" name="username" value="admin"  data-options="required:true" />
                            <!--<input type="text" name="username" placeholder="请输入用户名" style="width:150px;"/>-->
                        </td>
                        <td>
                            <label><i class="icon-lock"></i>密码</label>
                            <input id="p" class="easyui-validatebox" type="password" name="username" value="admin"  data-options="required:true" />
							<!--<input type="password" name="password" placeholder="请输入密码" style="width:155px;"/>-->
                        </td>
                    </tr>
                    <tr>
                    	<td>
                        	<div id="v_container" style="width: 150px;height: 50px;"/></div>
                        </td>
                        <td>
                        	<input type="text" style="width: 100px; margin-top:25px;" id="code_input" value=""/>
                        </td>
                    </tr>
                    <tr>
       	            	<!--<td><input type="submit" value="重置" style="margin-left:50px;"/></td>
                    	<td><input id="my_button" type="submit" name="submit" value="登录" style="margin-left:20px;"/></td>-->
                    	<td><a href="#" type="reset" class="easyui-linkbutton" iconCls="icon-no" style="margin-left:50px;width:70px;height:32px">重置</a></td>
                        <td><a id="my_button" type="button" class="easyui-linkbutton" iconCls="icon-ok" onclick="login()" style="margin-left:20px;width:70px;height:32px">登录</a></td>
                    </tr>
                    </table>
				</form>​​
			
        </div>
        
        
		<script>
			var verifyCode = new GVerify("v_container");
			document.getElementById("my_button").onclick = function(){
			var res = verifyCode.validate(document.getElementById("code_input").value);
			if(res){
				alert("验证正确");
			}else{
				alert("验证码错误");
			}
		}
			
		$('#u').validatebox({  
    		missingMessage:'用户名必填!' 
		});
		$('#p').validatebox({  
    		missingMessage:'密码必填!' 
		});
		
		function login(){
			var form = document.forms[0];
			form.action = "../login";
			form.method="post";
			form.submit();
		}
		</script>
    </body>
</html>